<@override name="title">资源管理</@override>

<@override name="styles">
<link href='${ctx}/static/plugins/validation/validationEngine.jquery.css' rel='stylesheet' type='text/css'>
<link href="${ctx}/static/plugins/ztree/css/metroStyle/metroStyle.css" rel="stylesheet" type="text/css">
</@override>


<@override name="header">
<h5>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-map-marker"></i>&nbsp;&nbsp; 系统设置</a></li>
        <li><a href="#">资源管理</a></li>
    </ol>
</h5>
</@override>

<@override name="content">
<div class="row">
    <div class="col-xs-6">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">资源列表</h3>
            </div>
            <div class="box-body">
                <ul id="tree" class="ztree"></ul>
            </div>
        </div>
    </div>

    <div class="col-xs-6">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">资源信息</h3>
            </div>
            <div class="box-body">
                <div class="alert alert-success fade in widget-inner" style="display: none;" id="resource-form-alert">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    保存成功
                </div>

                <div class="row">
                    <form class="form-horizontal" role="form" action="#" id="resource-form">
                        <input type="hidden" name="id">
                        <input type="hidden" name="pid">
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">上级资源: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="pname" readonly>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">资源名称: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control validate[required]" name="name">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">资源标识: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control validate[required]" name="action">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">链接地址: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control validate[required]" name="url">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">排序位置: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control validate[required, custom[integer]]" name="pos">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">图标: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="icon">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-right">备注: </label>
                            <div class="col-sm-8">
                                <textarea class="form-control" name="remark"></textarea>
                            </div>
                        </div>
                        <div class="form-actions text-center">
                            <button type="button" id="save" class="btn btn-success">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</@override>

<@override name="scripts">
<!-- ztree -->
<script type="text/javascript" src="${ctx}/static/plugins/ztree/jquery.ztree.all-3.5.js"></script>
<script type="text/javascript" src="${ctx}/static/plugins/ztree/ztree.js"></script>

<script type="text/javascript" src="${ctx}/static/plugins/validation/jquery.validationEngine.js"></script>
<script type="text/javascript" src="${ctx}/static/plugins/validation/jquery.validationEngine-zh_CN.js"></script>

<script type="text/javascript" src="${ctx}/static/views/system/resource/index.js"></script>
</@override>

<@extends name="/WEB-INF/_basic/main.ftl"/>